/* *****************************************************************************
 * JFab (http://code.google.com/p/jfab)
 * Copyright (c) 2011 JFab.org
 * Admin jfab@jeffreythompson.net
 *
 * See the file "LICENSE.txt" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 * *****************************************************************************/

package org.jfab.core.factory;

import org.jfab.core.collection.CGAnnotationList;
import org.jfab.core.collection.CGParameterList;
import org.jfab.core.collection.CGTypeList;
import org.jfab.core.collection.CommentList;
import org.jfab.core.collection.ModifierList;
import org.jfab.core.collection.ParameterNameList;
import org.jfab.core.model.CGParameter;
import org.jfab.core.model.CGType;

/**
 * Defines methods required by a code generator parameter factory.
 */
public interface CGParameterFactory
{
    /**
     * @param parameterType Parameter type. (required)
     * @param parameterName Parameter name. (required)
     * 
     * @return a new code generator parameter.
     */
    CGParameter createParameter(CGType parameterType, String parameterName);

    /**
     * @param referencedTypes Referenced types.
     * @param commentLines Comment lines.
     * @param annotations Annotations.
     * @param modifiers Modifiers (@see java.lang.reflect.Modifier)
     * @param parameterType Parameter type. (required)
     * @param parameterName Parameter name. (required)
     * 
     * @return a new code generator parameter.
     */
    CGParameter createParameter(CGTypeList referencedTypes,
            CommentList commentLines, CGAnnotationList annotations,
            ModifierList modifiers, CGType parameterType, String parameterName);

    /**
     * @param parameterTypes Parameter types.
     * @param parametersNames Parameter names.
     * 
     * @return a new list of parameters created from the given parameters.
     */
    CGParameterList createParameters(CGTypeList parameterTypes,
            ParameterNameList parametersNames);
}
